/* ===== FIFTEEN DIGESTION - COMPLETE STYLES ===== */

/* ===== VARIABLES ===== */
:root {
  --fifteen-primary-bg: #f5f4ed;
  --fifteen-secondary-bg: #ffc62f;
  --fifteen-font-color: #1e1e1e;
  --fifteen-gradient-1: linear-gradient(135deg, #ffebc4 0%, #ffebc4ad 100%);
  --fifteen-gradient-2: linear-gradient(
    45deg,
    #dfab46 40%,
    #dfb86d 40%,
    #dfab46 61%
  );
}

/* ===== MODAL OVERLAY ===== */
.fifteen-digestion-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  overflow-y: auto;
  padding: 20px;
}

.fifteen-digestion-modal.active {
  display: flex;
}

/* ===== MODAL CONTENT ===== */
.fifteen-modal-content {
  background: var(--fifteen-gradient-1);
  border-radius: 30px;
  padding: 30px;
  max-width: 1200px;
  width: 100%;
  max-height: 95vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: fifteenSlideUp 0.5s ease-out;
  position: relative;
  border: 6px solid var(--fifteen-secondary-bg);
}

@keyframes fifteenSlideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ===== CLOSE BUTTON ===== */
.fifteen-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--fifteen-font-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 2rem;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  font-weight: bold;
}

.fifteen-modal-close:hover {
  transform: scale(1.1) rotate(90deg);
  background: #ff4444;
}

/* ===== MODAL HEADER ===== */
.fifteen-modal-header {
  text-align: center;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 3px solid var(--fifteen-secondary-bg);
}

.fifteen-modal-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--fifteen-font-color);
  margin-bottom: 15px;
  font-weight: 900;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.fifteen-score-display {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--fifteen-secondary-bg);
  padding: 12px 25px;
  border-radius: 25px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.fifteen-score-label {
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: bold;
  color: var(--fifteen-font-color);
}

.fifteen-score-value {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 900;
  color: var(--fifteen-font-color);
}

/* ===== TAB NAVIGATION ===== */
.fifteen-tab-nav {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.fifteen-tab-btn {
  background: white;
  border: 3px solid #ddd;
  padding: 15px 25px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 120px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.fifteen-tab-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.fifteen-tab-btn.active {
  background: var(--fifteen-secondary-bg);
  border-color: var(--fifteen-font-color);
  transform: translateY(-3px);
}

.fifteen-tab-text {
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  font-weight: bold;
  color: var(--fifteen-font-color);
}

/* ===== TAB PANES ===== */
.fifteen-modal-body {
  background: var(--fifteen-primary-bg);
  border-radius: 20px;
  padding: var(--fs-10-16);
  min-height: 400px;
}

.fifteen-tab-pane {
  display: none;
  animation: fifteenFadeIn 0.4s ease-out;
}

.fifteen-tab-pane.active {
  display: block;
}

@keyframes fifteenFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== THEORY TAB ===== */
.fifteen-theory-pane h3 {
  color: var(--fifteen-font-color);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin: 1.5rem 0 1rem 0;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
  border-bottom: 3px solid var(--fifteen-secondary-bg);
  padding-bottom: 0.5rem;
}

.fifteen-theory-pane p {
  color: #2d3748;
  font-size: clamp(1rem, 2vw, 1.3rem);
  line-height: 1.8;
  margin: 1rem 0;
  font-weight: 500;
}

.fifteen-theory-pane ul,
.fifteen-theory-pane ol {
  margin: 1rem 0 1rem 1.5rem;
  padding-left: 1.5rem;
}

.fifteen-theory-pane li {
  color: #374151;
  font-size: clamp(0.95rem, 1.8vw, 1.2rem);
  line-height: 1.7;
  margin: 0.8rem 0;
  font-weight: 500;
}

.fifteen-theory-pane ul li::marker {
  color: var(--fifteen-secondary-bg);
  font-size: 1.4em;
  font-weight: bold;
}

.fifteen-theory-pane ol li::marker {
  color: var(--fifteen-font-color);
  font-weight: bold;
}

/* ===== GAME TAB ===== */
.fifteen-game-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--fifteen-font-color);
  margin-bottom: 20px;
  font-weight: bold;
  text-align: center;
}

.fifteen-game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1024px;
  margin: 20px auto;
}

.fifteen-labels-source {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  width: 100%;
}

.fifteen-draggable-label {
  background-color: #ff6347;
  color: white;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: grab;
  font-weight: bold;
  user-select: none;
  touch-action: none;
  position: relative;
  z-index: 10;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
  transition: transform 0.1s ease-out;
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  font-size: var(--fs-10-16);
  padding: 0.5em 0.75em;
}

.fifteen-draggable-label:active {
  cursor: grabbing;
}

.fifteen-digestion-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 20px auto;
  border: 1px solid #ccc;
  padding-top: 80.96%;
  height: 0;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.fifteen-digestion-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.fifteen-drop-target {
  position: absolute;
  width: 90px;
  height: 30px;
  background-color: rgba(255, 215, 0, 0.4);
  border-radius: 5px;
  border: 2px dashed #ffd700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8em;
  color: #333;
  transition: background-color 0.3s, border-color 0.3s;
}

.fifteen-drop-target.fifteen-correct {
  background-color: rgba(60, 179, 113, 0.4);
  border-color: #3cb371;
}

.fifteen-drop-target.fifteen-filled {
  border: none;
  background: none;
}

.fifteen-game-feedback {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  margin: 20px 0;
  min-height: 30px;
  text-align: center;
  color: var(--fifteen-font-color);
  font-weight: 600;
}

/* ===== QUIZ TAB ===== */
.fifteen-quiz-start,
.fifteen-quiz-question-screen,
.fifteen-quiz-result {
  padding: 20px;
}

.fifteen-quiz-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--fifteen-font-color);
  margin-bottom: 20px;
  font-weight: bold;
  text-align: center;
}

.fifteen-quiz-intro {
  background: white;
  border-radius: 20px;
  padding: 25px;
  margin: 20px 0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.fifteen-quiz-desc {
  font-size: clamp(1rem, 2vw, 1.3rem);
  line-height: 1.6;
  color: #555;
  margin-bottom: 20px;
  font-weight: 600;
}

.fifteen-score-info {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.fifteen-score-item {
  background: var(--fifteen-gradient-1);
  padding: 15px 25px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.fifteen-quiz-header {
  margin-bottom: 25px;
}

.fifteen-question-number {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  color: var(--fifteen-font-color);
  margin-bottom: 15px;
  text-align: center;
  font-weight: 800;
}

.fifteen-progress-bar {
  background: #ddd;
  height: 15px;
  border-radius: 10px;
  overflow: hidden;
}

.fifteen-progress-fill {
  background: var(--fifteen-secondary-bg);
  height: 100%;
  transition: width 0.5s ease;
  border-radius: 10px;
}

.fifteen-question-card {
  background: white;
  border-radius: 20px;
  padding: 30px;
  margin: 25px 0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.fifteen-question-text {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: bold;
  color: var(--fifteen-font-color);
  line-height: 1.5;
  text-align: center;
}

.fifteen-options-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 25px 0;
}

.fifteen-quiz-option {
  background: white;
  border: 3px solid #ddd;
  padding: 20px;
  border-radius: 15px;
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: bold;
  color: var(--fifteen-font-color);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.fifteen-quiz-option:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  border-color: var(--fifteen-secondary-bg);
}

.fifteen-quiz-option.fifteen-selected {
  background: var(--fifteen-secondary-bg);
  border-color: var(--fifteen-font-color);
  transform: translateY(-3px);
}

.fifteen-result-title {
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--fifteen-font-color);
  margin-bottom: 25px;
  text-align: center;
  font-weight: bold;
}

.fifteen-result-score-card {
  background: white;
  border-radius: 20px;
  padding: 30px;
  margin: 25px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
}

.fifteen-result-main-score {
  text-align: center;
}

.fifteen-result-score-number {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 900;
  color: var(--fifteen-secondary-bg);
  line-height: 1;
}

.fifteen-result-score-total {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: #666;
}

.fifteen-result-percentage {
  width: 150px;
  height: 150px;
}

.fifteen-circular-progress {
  width: 100%;
  height: 100%;
}

.fifteen-circular-progress svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.fifteen-score-details {
  background: var(--fifteen-gradient-1);
  border-radius: 20px;
  padding: 25px;
  margin: 25px 0;
}

.fifteen-score-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.fifteen-score-detail-item:last-child {
  border-bottom: none;
}

.fifteen-detail-label {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: #666;
  font-weight: 700;
}

.fifteen-detail-value {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: bold;
  color: var(--fifteen-font-color);
}

.fifteen-improvement-badge {
  background: #4caf50;
  color: white;
  padding: 15px 25px;
  border-radius: 15px;
  text-align: center;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: bold;
  margin-top: 15px;
}

.fifteen-saved-message {
  background: #4caf50;
  color: white;
  padding: 15px 25px;
  border-radius: 15px;
  text-align: center;
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: bold;
  margin: 20px 0;
}

.fifteen-quiz-review {
  margin: 30px 0;
}

.fifteen-review-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--fifteen-font-color);
  margin-bottom: 20px;
  text-align: center;
  padding-top: 20px;
  border-top: 3px solid #ddd;
  font-weight: 900;
}

.fifteen-review-table-wrapper {
  overflow-x: auto;
}

.fifteen-review-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.fifteen-review-table thead {
  background: var(--fifteen-secondary-bg);
}

.fifteen-review-table th {
  padding: 15px;
  text-align: left;
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  color: var(--fifteen-font-color);
  font-weight: bold;
}

.fifteen-review-table td {
  padding: 15px;
  border-bottom: 1px solid #ddd;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  color: #333;
  font-weight: 600;
}

.fifteen-review-table tr:last-child td {
  border-bottom: none;
}

.fifteen-correct-row {
  background: #e8f5e9;
}

.fifteen-wrong-row {
  background: #ffebee;
}

.fifteen-correct-answer-hint {
  display: block;
  font-size: clamp(0.8rem, 1.3vw, 0.9rem);
  color: #4caf50;
  font-weight: bold;
  margin-top: 5px;
}

.fifteen-result-badge {
  display: inline-block;
  padding: 5px 15px;
  border-radius: 10px;
  font-weight: bold;
  font-size: clamp(0.8rem, 1.3vw, 1rem);
}

.fifteen-badge-correct {
  background: #4caf50;
  color: white;
}

.fifteen-badge-wrong {
  background: #f44336;
  color: white;
}

/* ===== BUTTONS ===== */
.fifteen-btn-primary {
  background: var(--fifteen-font-color);
  color: white;
  border: none;
  padding: 15px 40px;
  font-size: clamp(1rem, 2vw, 1.3rem);
  border-radius: 25px;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  display: block;
  margin: 20px auto;
}

.fifteen-btn-primary:hover:not(.fifteen-btn-disabled) {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  background: #333;
}

.fifteen-btn-primary.fifteen-btn-large {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  padding: 20px 50px;
}

.fifteen-btn-primary.fifteen-btn-disabled {
  background: #95a5a6;
  cursor: not-allowed;
  opacity: 0.6;
}

.fifteen-btn-secondary {
  background: #666;
  color: white;
  border: none;
  padding: 12px 30px;
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  display: block;
  margin: 15px auto;
}

.fifteen-btn-secondary:hover {
  background: #555;
  transform: translateY(-2px);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.3);
}

/* ===== CUSTOM SCROLLBAR ===== */
.fifteen-modal-content::-webkit-scrollbar {
  width: 12px;
}

.fifteen-modal-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

.fifteen-modal-content::-webkit-scrollbar-thumb {
  background: var(--fifteen-secondary-bg);
  border-radius: 10px;
}

.fifteen-modal-content::-webkit-scrollbar-thumb:hover {
  background: #e6b422;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .fifteen-modal-content {
    padding: 20px;
    border-radius: 20px;
  }

  .fifteen-tab-nav {
    flex-direction: row;
    justify-content: space-around;
  }

  .fifteen-tab-btn {
    min-width: 90px;
    padding: 12px 15px;
  }

  .fifteen-drop-target {
    width: 45px;
    height: 10px;
  }

  .fifteen-result-score-card {
    flex-direction: column;
  }
}
@media (max-width: 576px) {
  .fifteen-draggable-label {
    font-size: 8px;
  }
  .fifteen-quiz-start, .fifteen-quiz-question-screen, .fifteen-quiz-result{
    padding: 0px;
  }
}

@media (max-width: 480px) {
  .fifteen-modal-content {
    padding: 15px;
  }

  .fifteen-modal-header {
    margin-bottom: 20px;
  }

  .fifteen-tab-btn {
    min-width: 80px;
    padding: 10px 12px;
  }

  .fifteen-tab-text {
    font-size: 0.8rem;
  }

  .fifteen-review-table {
    font-size: 0.85rem;
  }

  .fifteen-review-table th,
  .fifteen-review-table td {
    padding: 10px 5px;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
